using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Net;

namespace Xyne.Network
{
    public enum NetworkDataType
    {
        Unknown = 0,        // Unknown Type
        GameQuit,           // Quit the game
        GamePause,          // Pause the game
        GameWon,            // Game won
        GameLost,           // Game lost
        GameState,          // The game state
        StartCasting,       // Player starts casting
        StopCasting,        // Player stops casting
        PatternSelected,    // A pattern has been selected
        Action              // An action
    };

    /// <summary>
    /// Network data carries an unique ID and can be serialized
    /// </summary>
    public abstract class NetworkData
    {
        NetworkDataType type = NetworkDataType.Unknown;

        public NetworkDataType DataType
        {
            get { return type; }
            set { type = value; }
        }

        // Serialize by writing directly to the packet writer
        public abstract void Serialize(PacketWriter writer);
    }
}
